package com.lzw.mapper.dormitoryAdmin;

import com.lzw.pojo.AbsenceRecord;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.springframework.format.annotation.DateTimeFormat;

import java.time.LocalDate;
import java.time.LocalDateTime;
import java.util.List;

@Mapper
public interface AbsenceRecordMapper {
    List<AbsenceRecord> list(@Param("absenceDate") LocalDate absenceDate, @Param("student") String student);

    void delete(@Param("ids") List<Integer> ids);

    @Insert("INSERT INTO dormitorymanagement.absencerecord(student, absence_date, reason) VALUES (#{student},#{absenceDate},#{reason})")
    void add(AbsenceRecord absenceRecord);
}
